import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
import HomeView from '../view/Home.vue'
import LoginView from '../view/login.vue'
import Employment from '../view/employment.vue'
import Equipment from '../view/equipment.vue'
import Security from '../view/security.vue'

const routes: Array<RouteRecordRaw> = [
  // 重定向home页 1123
  {
    path:'/',
    redirect:'/home'
  },
  {
    path: '/home',
    name: 'home',
    component: HomeView
  },
  {
    path: '/login',
    name: 'login',
   component:LoginView
  },
  {
    path:'/employment',
    component:Employment
  },
  {
    path:'/equipment',
    component:Equipment
  },
  {
    path:'/security',
    component:Security
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router
